#ifndef __HNS_MDIO_H__
#define __HNS_MDIO_H__
#include <linux/phy.h>

#define MDIO_CDEV_MINORS 1
#define MDIO_CDEV_NAME "davinci_mdio"

#define MDIO_IOC_MAGIC 'M'
#define MDIO_IO_READ _IOR(MDIO_IOC_MAGIC, 50, unsigned int)
#define MDIO_IO_WRITE _IOW(MDIO_IOC_MAGIC, 51, unsigned int)

#define PHY_ADDR_FIXED 2

struct hns_mdio_arg {
    u16 devaddr;
    u16 regaddr;
    u16 value_in;
    u16 value_out;
};

struct mii_bus *hns_get_mdiobus(void);

#endif
